<div class="modal-header">
    <h4 class="modal-title">修改密码</h4>
</div>

<div class="modal-body">
    <form class="form-horizontal" name="passwordForm" novalidate ng-submit="changePassword()">
        <div class="form-group">
            <label class="col-sm-3 ">原密码</label>
            <div class="col-sm-8">
                <input  type="password" class="form-control" ng-model="user.oldPassword"
                        placeholder="请输入原密码" required>
            </div>
            <div class="col-sm-3"></div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 ">新密码</label>
            <div class="col-sm-8">
                <input  type="password" class="form-control" ng-model="user.newPassword" name="newPassword"
                        placeholder="请输入新密码" required>
            </div>
            <div class="col-sm-3"></div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 ">确认新密码</label>
            <div class="col-sm-8">
                <input  type="password" class="form-control" ng-model="user.confirmPassword" name="confirmPassword"
                        placeholder="请再次输入新密码" required>
               <span style="color: red" ng-show="passwordForm.confirmPassword.$valid">
                <span ng-show="user.newPassword!=user.confirmPassword">两次密码输入不一致</span>
                     </span>
            </div>
            <div class="col-sm-3">

            </div>
        </div>
    </form>
</div>

<div class="modal-footer">
    <div class="row">
        <div class="col-xs-4 col-xs-offset-1">
            <button class="btn btn-default btn-action" ng-click="cancel()">取 消</button>
        </div>
        <div class="col-xs-2"></div>
        <div class="col-xs-4">
            <button class="btn btn-primary btn-action" ng-disabled="loading||!passwordForm.$valid||
            user.newPassword!=user.confirmPassword" ng-click="changePassword()">
                确 定
            </button>
        </div>
    </div>
</div>



